﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using System.Diagnostics;
using CrystalDecisions.Shared;
using System.Configuration;
using CrystalDecisions.CrystalReports.Engine;

namespace Control
{
    public partial class ctrlDocGiaNoTienPhat : DevExpress.XtraEditors.XtraUserControl
    {
        public ctrlDocGiaNoTienPhat()
        {
            InitializeComponent();
            
            //format date
            this.dateThoiGian.Properties.DisplayFormat.FormatString = "dd/MM/yyyy";
            this.dateThoiGian.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
            this.dateThoiGian.Properties.EditFormat.FormatString = "dd/MM/yyyy";
            this.dateThoiGian.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
            this.dateThoiGian.Properties.Mask.EditMask = "dd/MM/yyyy";
        }

        private void ctrlDocGiaNoTienPhat_Load(object sender, EventArgs e)
        {
            dateThoiGian.DateTime = DateTime.Today;
        }

        private void btnXemBaoCao_Click(object sender, EventArgs e)
        {
            rptDocGiaNoTienPhat rpt = new rptDocGiaNoTienPhat();
            rpt.SetParameterValue("Ngay", dateThoiGian.DateTime);

            crystalReportViewer1.ReportSource = rpt;
        }
    }
}
